package template;

import org.springframework.jdbc.core.RowMapper;

import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.List;

public class JDBCTemplate {
    private DataSource dataSource;

    public JDBCTemplate(DataSource dataSource) {
        this.dataSource = dataSource;
    }
    public <T> List<T> queryForList(String sql, RowMapper<T> mapper, String[]values){
        try {
            Connection connection=this.dataSource.getConnection();
            PreparedStatement statement=connection.prepareStatement(sql);

        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        return null;
    }
}
